import {request} from '../request/request'
// 轮播
export function getLunboData(){
  return new Promise((red, rej) => {
    request({
      url: '/banner/list',
    }).then(res => {
      red(res)
    })
  })
}
// 分类详情
export function getNavData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/category/all',
    }).then(res => {
      red(res)
    })
  })
}

//限时秒杀
export function getMiaoshaData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/list?miaosha=true',
    }).then(res => {
      red(res)
    })
  })
}
//爆品推荐
export function getBaopinData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/list?categoryId=233756',
      method:"POST",
      header:{
       "content-type":"application/x-www-form-urlencoded"
      }

    }).then(res => {
      red(res)
    })
  })
}

//疯狂砍价
export function getKanjiaData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/list?kanjia=true',

    }).then(res => {
      red(res)
    })
  })
}

//全民拼团
export function getPintuanData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/list?pingtuan=true',

    }).then(res => {
      red(res)
    })
  })
}

//商品列表
export function getGoodslistData(){
  return new Promise((red, rej) => {
    request({
      url: '/shop/goods/list',
    }).then(res => {
      red(res)
    })
  })
}